package org.example.Day9;

import java.io.Serializable;

public class User implements Serializable {
    //实现序列化
    private String loginName;
    private String userName;
    private  int age;
    //transient不参与序列化
    private transient String passWord;
    public User(){

    }
    public User(String loginName,String userName,int age,String passWord){
        this.age = age;
        this.passWord=passWord;
        this.userName=userName;
        this.loginName=loginName;
    }

    @Override
    public String toString() {
        return "User{" +
                "loginName='" + loginName + '\'' +
                ", userName='" + userName + '\'' +
                ", age=" + age +
                ", passWord='" + passWord + '\'' +
                '}';
    }
}
